/* AnimaUI for wechat-miniprogram  v1.0.0 | by 花夏(huaxia@animaui.com) 2020-03-25 18:10:37 */
@import '../common.less';
/** 顶部自定义导航 **/
.@{prefix}-custom {
    display: block;
    position: relative;
    .@{prefix}-bar {
        min-height: 0;
        padding-right: 220rpx;
        box-shadow: 0 0 0;
        z-index: 9999;
        display: flex;
        position: relative;
        align-items: center;
        min-height: 100rpx;
        justify-content: space-between;
        .action {
            display: flex;
            align-items: center;
            height: 100%;
            justify-content: center;
            max-width: 100%;
            &.border-title {
                position: relative;
                top: -10rpx;
                text[class*="bg-"]:last-child {
                    position: absolute;
                    bottom: -0.5rem;
                    min-width: 2rem;
                    height: 6rpx;
                    left: 0;
                }
            }
            &.sub-title {
                position: relative;
                top: -0.2rem;
                text {
                    position: relative;
                    z-index: 1;
                }
                text[class*="bg-"]:last-child {
                    position: absolute;
                    display: inline-block;
                    bottom: -0.2rem;
                    border-radius: 6rpx;
                    width: 100%;
                    height: 0.6rem;
                    left: 0.6rem;
                    opacity: 0.3;
                    z-index: 0;
                }
                text[class*="text-"]:last-child {
                    position: absolute;
                    display: inline-block;
                    bottom: -0.7rem;
                    left: 0.5rem;
                    opacity: 0.2;
                    z-index: 0;
                    text-align: right;
                    font-weight: 900;
                    font-size: 36rpx;
                }
            }
            &:first-child {
                margin-left: 30rpx;
                font-size: 30rpx;
                & > text[class*="@{prefix}-icon-"] {
                    margin-left: -0.3em;
                    margin-right: 0.3em;
                }
            }
            text {
                &.text-cut {
                    text-align: left;
                    width: 100%;
                }
            }
            &:last-child {
                margin-right: 30rpx;
            }
            & > text[class*="@{prefix}-icon-"] {
                & + text[class*="@{prefix}-icon-"] {
                    margin-left: 0.5em;
                }
            }
        }
        .@{prefix}-avatar {
            &:first-child {
                margin-left: 20rpx;
            }
        }
        .content {
            position: absolute;
            text-align: center;
            width: calc(100% - 440rpx);
            left: 0;
            right: 0;
            bottom: 0;
            top: 0;
            margin: auto;
            height: 60rpx;
            font-size: 32rpx;
            line-height: 60rpx;
            cursor: none;
            pointer-events: none;
            text-overflow: ellipsis;
            white-space: nowrap;
            overflow: hidden;
            image {
                height: 60rpx;
                width: 240rpx;
            }
        }
        &.ios {
            .content {
                bottom: 7px;
                height: 30px;
                font-size: 32rpx;
                line-height: 30px;
            }
        }
        &.btn-group {
            justify-content: space-around;
            button {
                padding: 20rpx 32rpx;
                flex: 1;
                margin: 0 20rpx;
                max-width: 50%;
            }
        }
        .search-form {
            background-color: #f5f5f5;
            line-height: 64rpx;
            height: 64rpx;
            font-size: 24rpx;
            color: var(--black);
            flex: 1;
            display: flex;
            align-items: center;
            margin: 0 30rpx;
            & + .action {
                margin-right: 30rpx;
            }
            input {
                flex: 1;
                padding-right: 30rpx;
                height: 64rpx;
                line-height: 64rpx;
                font-size: 26rpx;
                background-color: transparent;
            }
            [class*="@{prefix}-icon-"] {
                margin: 0 0.5em 0 0.8em;
            }
            [class*="@{prefix}-icon-"]::before {
                top: 0;
            }
        }
        &.foot {
            position: fixed;
            width: 100%;
            bottom: 0;
            z-index: 1024;
            box-shadow: 0 -1rpx 6rpx rgba(0, 0, 0, 0.1);
        }
        &.tabbar {
            padding: 0;
            height: calc(100rpx + env(safe-area-inset-bottom) / 2);
            padding-bottom: calc(env(safe-area-inset-bottom) / 2);
            &.shadow {
                box-shadow: 0 -1rpx 6rpx rgba(0, 0, 0, 0.1);
            }
            .action {
                font-size: 22rpx;
                position: relative;
                flex: 1;
                text-align: center;
                padding: 0;
                display: block;
                height: auto;
                line-height: 1;
                margin: 0;
                overflow: initial;
                &.add-action {
                    position: relative;
                    z-index: 2;
                    padding-top: 50rpx;
                    background-color: inherit;
                    [class*="@{prefix}-icon-"] {
                        position: absolute;
                        width: 70rpx;
                        z-index: 2;
                        height: 70rpx;
                        border-radius: 50%;
                        line-height: 70rpx;
                        font-size: 50rpx;
                        top: -35rpx;
                        left: 0;
                        right: 0;
                        margin: auto;
                        padding: 0;
                    }
                    &::after {
                        content: "";
                        position: absolute;
                        width: 100rpx;
                        height: 100rpx;
                        top: -50rpx;
                        left: 0;
                        right: 0;
                        margin: auto;
                        box-shadow: 0 -3rpx 8rpx rgba(0, 0, 0, 0.08);
                        border-radius: 50rpx;
                        background-color: inherit;
                        z-index: 0;
                    }
                    &::before {
                        content: "";
                        position: absolute;
                        width: 100rpx;
                        height: 30rpx;
                        bottom: 30rpx;
                        left: 0;
                        right: 0;
                        margin: auto;
                        background-color: inherit;
                        z-index: 1;
                    }
                }
                [class*="@{prefix}-icon-"] {
                    width: 100rpx;
                    position: relative;
                    display: block;
                    height: auto;
                    margin: 0 auto 10rpx;
                    text-align: center;
                    font-size: 40rpx;
                }
                .@{prefix}-image {
                    margin: 0 auto;
                    image {
                        width: 50rpx;
                        height: 50rpx;
                        display: inline-block;
                    }
                }
            }
            &.shop {
                .action {
                    width: 140rpx;
                    flex: initial;
                }
            }
            .btn-group {
                flex: 1;
                display: flex;
                justify-content: space-around;
                align-items: center;
                padding: 0 10rpx;
            }
            button {
                &.action {
                    &::after {
                        border: 0;
                    }
                }
            }
            .submit {
                align-items: center;
                display: flex;
                justify-content: center;
                text-align: center;
                position: relative;
                flex: 2;
                align-self: stretch;
                &:last-child {
                    flex: 2.6;
                }
                & + .submit {
                    flex: 2;
                }
            }
            &.border {
                .action {
                    &::before {
                        content: " ";
                        width: 200%;
                        height: 200%;
                        position: absolute;
                        top: 0;
                        left: 0;
                        transform: scale(0.5);
                        transform-origin: 0 0;
                        border-right: 1rpx solid rgba(0, 0, 0, 0.1);
                        z-index: 3;
                    }
                    &:last-child {
                        &:before {
                            display: none;
                        }
                    }
                }
            }
        }
        &.input {
            padding-right: 20rpx;
            background-color: var(--white);
            input {
                overflow: initial;
                line-height: 64rpx;
                height: 64rpx;
                min-height: 64rpx;
                flex: 1;
                font-size: 30rpx;
                margin: 0 20rpx;
                & + .action {
                    margin-right: 20rpx;
                    margin-left: 0;
                }
            }
            .action {
                margin-left: 20rpx;
                [class*="@{prefix}-icon-"] {
                    font-size: 48rpx;
                }
                &:first-child {
                    [class*="@{prefix}-icon-"] {
                        margin-left: 0;
                    }
                }
            }
        }
        .border-custom {
            position: relative;
            background: rgba(0, 0, 0, 0.15);
            border-radius: 1000rpx;
            height: 60rpx;
            &::after {
                content: " ";
                width: 200%;
                height: 200%;
                position: absolute;
                top: 0;
                left: 0;
                border-radius: inherit;
                transform: scale(0.5);
                transform-origin: 0 0;
                pointer-events: none;
                box-sizing: border-box;
                border: 1rpx solid var(--white);
                opacity: 0.5;
            }
            &::before {
                content: " ";
                width: 1rpx;
                height: 110%;
                position: absolute;
                top: 22.5%;
                left: 0;
                right: 0;
                margin: auto;
                transform: scale(0.5);
                transform-origin: 0 0;
                pointer-events: none;
                box-sizing: border-box;
                opacity: 0.6;
                background-color: var(--white);
            }
            text {
                display: block;
                flex: 1;
                margin: auto !important;
                text-align: center;
                font-size: 28rpx;
            }
        }
        &.justify-center {
            .action {
                &.border-title,
                &.sub-title {
                    text:last-child {
                        left: 0;
                        right: 0;
                        margin: auto;
                        text-align: center;
                    }
                }
                & > {
                    text[class*="@{prefix}-icon-"],
                    view[class*="@{prefix}-icon-"] {
                        font-size: 28rpx;
                    }
                }
            }
        }
    }
}
.@{prefix}-bar.fixed,
.nav.fixed {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1024;
    box-shadow: 0 1rpx 6rpx rgba(0, 0, 0, 0.1);
}
.@{prefix}-tabbar-height {
    min-height: 100rpx;
    height: calc(100rpx + env(safe-area-inset-bottom) / 2);
}
